package SEDay02;

import java.util.Scanner;

public class Subject {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个3位数：");

        int num = scanner.nextInt();

        int a = num / 100;
        int b = num / 10 % 10;
        int c = num % 10;

        int sum = a + b + c;

        System.out.println("三位数" + num + "每一位的数字和为：" + sum);

    }
}
